<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <h2>{{message}}</h2>
        <ul>
            <li v-on:click="changeLi()" v-for="(m,index) in movies">{{index}}.{{m.name}}</li>
        </ul>
        <img v-bind:src="imgUrl">

        <h2 class="title" :class="[active,line]">{{fullName}}</h2>
        <h2 class="title" :class="getClasses()">{{getMessage()}}</h2>
    </div>
    <script>
        // let,const
        const app = new Vue({
            el:'#app',
            data:{
                message:'hello world',
                imgUrl:'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1572705635223&di=b638a5a190bd40a00a032961987cd716&imgtype=0&src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2Ff4c0ec89ec71d12f03df9405c6e2f0c9c7705fa54d876-gyKDrK_fw658',
                movies:[{key:1,name:'后云云'},{key:2,name:'语欣'},{key:3,name:'欣欣'}],
                active:'aaaaa',
                line:'bbbbb'
            },
            // computed:计算属性（）
            computed : {
              fullName : function () {
                  return this.message
              }
            },
            methods:{
                getMessage:function(){
                  return this.message
                },
                changeLi:function(){
                  console.log(this)
                },
                getClasses:function(){
                    return [this.active, this.line]
                }
            }
        });
    </script>
</body>
</html>